<?php
/**
 * Created by PhpStorm.
 * User: lullabies
 * Date: 2019/5/22
 * Time: 23:36
 */

namespace app\api\model;


use think\Model;

class ExamBanner extends Model
{
    //设置隐藏字段
    protected $hidden=['status'];
    //对应的数据表
    protected $table = 'art_exam_banner';
    /**
     * 获取banner轮播图信息
     */
    public static function listBanner($num)
    {
        $result = self::where('status', 1)
            ->order('create_time', 'desc')
            ->limit($num)
            ->select();
        return $result;
    }

}